<?php

namespace Addons\Crop;

use Common\Controller\Addon;

require_once('ThinkPHP/Library/Vendor/PHPImageWorkshop/ImageWorkshop.php');

use PHPImageWorkshop\Core\ImageWorkshopLayer;
use PHPImageWorkshop\ImageWorkshop;

/**
 * Class CropAddon  图片上传裁剪
 * @package Addons\Crop
 * @author:xjw129xjt xjt@ourstu.com
 */
class CropAddon extends Addon
{
    public $info = array(
        'name' => 'Crop',
        'title' => '图片裁剪插件',
        'description' => '用于图片的上传并裁剪',
        'status' => 1,
        'author' => 'xjw129xjt',
        'version' => '0.1'
    );
    public function install()
    {
        return true;
    }

    public function uninstall()
    {
        return true;
    }
    public function upload_crop($param)
    {
        $this->assign($param);
        $this->display('upload');
    }
}